Example data analysis workflow
Contents
Example data analysis workflow¶
Make up some data¶
import altair as alt
from IPython.core.display import Image, display
from bayes_window import generate_fake_spikes, fake_spikes_explore, BayesRegression
df, df_monster, index_cols, firing_rates = generate_fake_spikes(n_trials=20,
n_neurons=6,
n_mice=3,
dur=5,
mouse_response_slope=40,
overall_stim_response_strength=5)
Problem statement¶
There are three subjects with five neurons each. Some invervention is applied (pharmaceutical, stimulation, etc) that affects how often neurons are activated.
Neuron 4 of mouse 0 has the least effect
Neuron 0 mouse 2 has the most effect
Slow neurons are affected the most across all mice
We’ll consider interspike interval (ISI) as the measure of activity
Exploratory plots¶
# Make:
charts = fake_spikes_explore(df=df, df_monster=df_monster, index_cols=index_cols)
# Render:
charts[-3].properties(title='Change in firing rate (Hoverable, try it!)').display()
[chart.display() for chart in charts[:-1]];